﻿namespace Composite
{
    internal abstract class Entry
    {
        public abstract string GetName();
        public abstract int GetSize();

        public Entry Add(Entry entry)
        {
            throw new FileTreatmentException();
        }

        public void PrintList()
        {
            this.PrintList("");
        }

        public abstract void PrintList(string prefix);

        public override string ToString()
        {
            return $"{this.GetName()} ({this.GetSize()})";
        }
    }
}
